/*
* 公司：Leita Tech
* 版权信息：雷塔所有
* 任务：
* 描述：
* 作者：李大平
* 日期：2020/06/04
*
*/

import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12

GridLayout{
    width: parent.width; height: 300
    onColumnsChanged: {
        //console.log(columns)
        if(columns == 0)
            height = 300
        else if(columns == 1)
            height = 350
        else if(columns == 2)
            height = 250
        else
            height = 150
    }

    columns: parent.width / 200
    columnSpacing: 5
    Rectangle {
        color: 'teal'
        Layout.fillWidth: true
        //Layout.minimumWidth: 50
        Layout.preferredWidth: 100
        //Layout.maximumWidth: 300
        Layout.minimumHeight: 150
        Text {
            anchors.centerIn: parent
            text: name + "_1_" + parent.width + 'x' + parent.height
            //font: chFont.name
        }
    }
    Rectangle {
        color: 'plum'
        Layout.fillWidth: true
        //Layout.minimumWidth: 100
        Layout.preferredWidth: 200
        Layout.preferredHeight: 100
        Text {
            anchors.centerIn: parent
            text: number + "_2_" + parent.width + 'x' + parent.height
            //font: chFont.name
        }
    }
    Rectangle {
        color: 'plum'
        Layout.fillWidth: true
        //Layout.minimumWidth: 100
        Layout.preferredWidth: 300
        Layout.preferredHeight: 100
        Text {
            anchors.centerIn: parent
            text: manager.name + "_3_" + parent.width + 'x' + parent.height
            //font: chFont.name
        }
    }
}
